package com.boarsoft.message.test;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@Configuration
@EnableTransactionManagement
@ComponentScan
public class TxMsgMain {
	private static ClassPathXmlApplicationContext ctx;

	private final TxMsgService txMsgService;

	public TxMsgMain(TxMsgService txMsgService) {
		this.txMsgService = txMsgService;
	}

	public static void main(String[] args) {
		ctx = new ClassPathXmlApplicationContext("classpath:conf/context.xml");
		ctx.getBean(TxMsgMain.class).send();

	}
	public void send() {
		txMsgService.sendTxMsg();
	}

}

